<template>
  <div id="app">
    <product-one/>
    <product-two :products="products"/>
  </div>
</template>

<script>
import ProductOne from './components/ProductOne'
import ProductTwo from './components/ProductTwo'
export default {
  name: 'app',
  components: {
    ProductOne,
    ProductTwo
  },
  data () {
    return {
      products: [
        {
          name: '马云', price: 300
        },
        {
          name: '马化腾', price: 200
        },
        {
          name: '马上', price: 100
        },
        {
          name: '马道', price: 50
        }
      ]
    }
  },
  methods: {
  },
  created () {
    let data = this.products
    this.$store.commit('setProducts', data)
  }
}
</script>
<style lang="stylus">

</style>
